home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-05-29 | 1.1 KB | 53 lines | [TEXT/MPCC] |
- /*
- File: TestFunctions.c
-
- Contains: Insert the test functions inside this file.
-
- Written by: DTS
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <1> 2/26/95 khs first file
-
- */
-
-
- // INCLUDES
- #include "TestFunctions.h"
-
- #include "DTSQTUtilities.h"
- #include "MacFramework.h"
-
-
- // TEST FUNCTIONS
- // ______________________________________________________________________
- void ResizeTheMovieWindow(long theMovieSize)
- {
- MovieController mc = NULL;
- Rect originalRect;
- WindowRef aWindow = NULL;
- WindowObject aWindowObject = NULL;
-
- // We need all this code below
- aWindow = FrontWindow(); // do we have a window?
- if(aWindow == NULL)
- {
- SysBeep(10);
- return;
- }
-
- mc = GetMCFromFrontWindow(); // does the front window have a movie controller?
- if(mc == NULL)
- {
- SysBeep(10);
- return;
- }
-
- aWindowObject = (WindowObject)GetWRefCon(aWindow); DebugAssert(aWindowObject != NULL);
- originalRect = (**aWindowObject).originalSize;
-
- if ( QTUResizeMCWindow(mc, (WindowPtr) aWindow, theMovieSize, originalRect) != noErr)
- SysBeep(10);
- }